import React, {Component} from 'react';
import { inject, observer } from 'mobx-react';

@inject('languageStore')
@observer
export default class ModuleName extends Component{
	constructor(props) {
	  super(props);
	  this.state = {

    }
	}

	componentDidMount(){

  }

  backClick = () => {
  	if(this.props.backFunction){
  		this.props.backFunction();
  	}else{
  		window.history.go(-1)
  	}
  }

	render(){
		const topData = this.props.languageStore.getPageData('top');
		const { title } = this.props;
		return (
			<NavBar 
				leftContent={topData.back}
	      mode="light"
	      onLeftClick={this.backClick}
	    >{title}</NavBar>
		)
	}
}


